﻿// CDialogueBox.cs
// Author: Gant Briseno
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace Casters.source.States.UIs
{
    public class CDialogueBox : CBaseUI
    {
        SpriteFont m_Font;
        string m_String;

        float m_CharTimer;
        float m_CharDelay;
        int m_Index;
        Texture2D m_Image;

        public CDialogueBox(SpriteFont font, string _string)
        {
            m_Font = font;
            m_String = _string;
        }

        public override void Initialize()
        {
            m_CharTimer = 0f;
            m_CharDelay = 0f;
            m_Index = 0;
        }

        public override void LoadContent()
        {
            m_Image = CGame.GetInstance().Content.Load<Texture2D>("Menu/menu_window");
        }

        public override void UnloadContent()
        {
            m_Image = null;
        }

        public override void Update(float dt)
        {
            m_CharTimer += dt;

            if (m_CharTimer >= m_CharDelay)
                ++m_Index;
        }

        public override void Draw()
        {
        }
    }
}
